The arithmetic coding is known as one of the efficient data compressing methods, and is widely used in coding standards, including JBIG, JPEG2000, H.264/AVC, and High-Efficiency Video Coding (HEVC). In H.264/AVC and HEVC Test Model Version 16.0 (HM-16.0), context-based adaptive binary arithmetic coding (CABAC) is adopted as the entropy coding tool in the video coding system.
As shown in FIG. 1, CABAC consists of three parts: binarization unit 110, context modelling unit 120, and binary arithmetic coding unit 130. In the binarization step, each syntax element is uniquely mapped into a binary string (bin or bins). In the context modelling step, a probability model is selected for each bin. The corresponding probability model may depend on previously encoded syntax elements, bin indexes, and side information. After the binarization and the context model assignment, a bin value along with its associated model is transmitted to the binary arithmetic coding engine.
Binary arithmetic coding is a recursive interval-subdividing procedure. The output bitstream is the pointer to the final probability of coding interval. The probability of coding interval, T is specified by range and the lower bound of coding interval (designated as “low” in the following discussion). The range is the possible scope of the coding interval. Depending on whether the current symbol is the most probable symbol (MPS) or the least probable symbol (LPS), the next coding interval is updated as one of the two sub-intervals accordingly, as shown in eq. (1) and eq. (2).
                              range                      n            +            1                          =                  {                                                                                                                range                      n                                        -                                          rangeLPS                      n                                                        ,                                                                              if                  ⁢                                                                          ⁢                  MPS                                                                                                                          rangeLPS                    n                                    ,                                                                              if                  ⁢                                                                          ⁢                  LPS                                                                                        (        1        )                                          low                      n            +            1                          =                  {                                                                                          low                    n                                    ,                                                                              if                  ⁢                                                                          ⁢                  MPS                                                                                                                                                low                      n                                        +                                          range                      n                                        -                                          rangeLPS                      n                                                        ,                                                                              if                  ⁢                                                                          ⁢                  LPS                                                                                        (        2        )            where rangeLPS is the estimated range when LPS is coded.
FIG. 2 illustrates the concept of the binary arithmetic coding. Initially, the probability range (i.e., range0) is 1 and the low boundary (i.e., low0) is 0 as indicated by probability scale 210. If the first symbol is a MPS symbol, a pointer in the lower part of the probability scale 210 may be used to signal the event of an MPS symbol. The range1 is used as the probability scale 220 for processing the next symbol. Again, the probability scale 220 is divided into two parts for MPS and LPS respectively. If the second symbol is an LPS symbol, the rangeLPS1 is selected as the probability scale 230 for the next symbol. Every time when a new symbol is coded, the corresponding range becomes smaller. When a range becomes too small, the range can be re-normalized to form a probability scale 240 with larger range.
In modern arithmetic coding, the probability update is often done according to a model. For example, a method is described by Marpe, et al., in a technical publication (“Context-Based Adaptive Binary Arithmetic Coding in the H.264/AVC Video Compression Standard”, IEEE Transactions on Circuits and Systems for Video Technology, Vol. 13, No. 7, pp. 620-636, July 2003), where the following formula is used:pnew=(1−α)·y+α·pold.  (3)
In the above equation, y is equal to 0 if current symbol is a most probable symbol (MPS); otherwise, y is equal to 1. This formula provides an estimated value for probability of the least probable symbol (LPS). The weighting α is derived according to the following equation:α=(min_prob/0.5)(1/state_number),  (4)where min_prob corresponds to the minimum probability of the least probable symbol of CABAC and state_number corresponds to the number of context states for probability value estimation.
For CABAC of HEVC, there are 64 probability states. The min_prob is 0.01875, and the state_number is 63. Each state has a probability value indicating the probability to select the LPS. The 64 representative probability values, pσ∈[0.01875,0.5], were derived for the LPS by the following recursive equation:Pσ=α·Pσ−1 for all σ=1, . . . ,63,with α=(0.01875/0.5)1/63 and p0=0.5  (5)
The rangeLPS value of a state σ is derived by the following equation:rangeLPSσ=RANGE×Pσ  (6)
To reduce the computations required for deriving rangeLPS, the result of rangeLPS of each range value can be pre-calculated and stored in a lookup table (LUT). In H.264/AVC and HEVC, a 4-column pre-calculated rangeLPS table is adopted to reduce the table size as shown in Table 1. The range is divided into four segments. In each segment, the rangeLPS of each probability state σ (pσ) is pre-defined. In other words, the rangeLPS of a probability state σ is quantized into four values. The rangeLPS selected depends on the segment that the range belongs to.
TABLE 1(Range >> 6)&3Sets0123Range Min256320384448Range Max319383447510StateRange LPS01281762082401128167197227212815818721631231501782054116142169195511113516018561051281521757100122144166895116137158990110130150108510412314211819911713512779411112813738910512214698510011615668095110166276901041759728699185669819419536577892051627385214859698022465666762343536372244150596925394856652637455462273543515928334148562932394653303037435031293541483227333945332631374334243035413523283339362227323737212630353820242933391923273140182226304117212528421620232743151922254414182124451417202346131619224712151821481214172049111416195011131518511012151752101214165391113155491112145581012145689111357791112587910125978101160689116167910626789632222
In JCTVC-F254 (Alshin et al., Multi-parameter probability up-date for CABAC, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, 6th Meeting: Torino, IT, 14-22 Jul. 2011, Document: JCTVC-F254), Alshin, et al., disclose a multi-parameter probability update for the CABAC of the HEVC standard. The parameter N=1/(1−α) is an approximate measurement for number of previously encoded bins (i.e., “window size”) that have significant influence on the current bin. The choice of parameter N determines sensitivity of the model. A sensitive system will react to real changing quickly. On the other hand, a less sensitive model will not react to noise and random errors. Both properties are useful but contradictory. Accordingly, Alshin, et al., disclose a method to calculate several values with different αi simultaneously:pi_new=(1−αi)·y+αipi_old  (7)and use weighted average as next bin probability prediction:pnew=Σ(βi·pi_new),  (8)where βi is a weighting factor associated with αi.
Instead of state transition lookup tables (m_aucNextStateMPS and m_aucNextStateLPS) utilized in CABAC of the AVC standard for updating the state and its corresponding probability, Alshin, et al., use the explicit calculation with multiplication free formula for probability update. Assuming that probability pi is represented by integer number Pi from 0 to 2k (i.e., pi=Pi/2k) and αi is represented by 1 over a power of two number (i.e., αi=½Mi), multiplication free formula for probability update can be derived as follows:Pi=(Y>>Mi)+P−(Pi>>Mi)  (9)
This formula predicts probability that next bin will be “1”, where Y=2k if the last coding bin is “1”, Y=0 if the last coding bin is “0”, and “>>Mi” corresponds to the right shift by Mi bits operation.
To keep balance between complexity increase and performance improvement, it is considered that linear combination for probability estimation consists of only two parameters:P0=(Y>>4)+P0−(P0>>4),  (10)P1=(Y>>7)+P1−(P0>>7), and  (11)P=(P0+P1+1)>>1.  (12)
Floating point value that corresponds to probability for AVC CABAC is always less than or equal to ½. If the probability exceeds this limit, LPS becomes MPS to keep probability inside interval mentioned above. It needs MPS/LPS switching when the probability of MPS/LPS is larger than 0.5. Alshin, et al., proposed to increase permissible level of probability (in terms of float-point values) up to 1 to avoid MPS/LPS switching. Therefore, one lookup table (LUT) for storing RangeOne or RangeZero is derived.
In VCEG-AZ07 (Chen, et al., “Further improvements to HMKTA-1.0”, ITU-T Video Coding Experts Group (VCEG) meeting, Warsaw, Poland, IT, 19-26 Jun. 2015, Document: VCEG-AZ07), Chen, et al., proposed to use a single parameter CABAC. The probability derivation is the same as JCTVC-F254, which uses eq. (9) to derive the probability of being one or zero. For each context, only one updating speed is used, which means for each context, only one N is used. However, different contexts can use different N's. The range for N is from 4 to 7, and a 2-bit variable is used to indicate the probability updating speed for a specific context model. The N value is determined at the encoder side and signalled in the bitstream.
In JCTVC-F254 and VCEG-AZ07, the LUT of RangeOne or RangeZero is a 64-column by 512-row table. The input of the LUT is current range and the current probability. The valid range of the current range is from 256 to 510. The current range is divided into 64 sections, where each section contains 4 values of current range (e.g. 256 to 259, 260 to 263, etc.). The section index of range can be derived by:rangeIdx=(range>>2)−64, or  (13)rangeIdx=(range>>2)&63  (14)
The valid range of the current probability (P) is from 0 to 2k−1. In JCTVC-F254 and VCEG-AZ07, the k is 15. The current probability is divided into 512 sections, where each section contains 64 values of current probability (e.g. 0 to 63, 64 to 127, etc.). The section index of probability can be derived byprobIdx=(P>>6).  (15)
The RangeOne value can be derived by table lookup, for exampleRangeOne=tableRangeOne[rangeIdx][probIdx]  (16)
Each value in tableRangeOne is derived byEntryValue=Round(clip3(3,MinRange−3,MinRange*(probIdx+0.5)/M)),  (17)where MinRange is the lowest range value of the derived rangeIdx. The clip3(X, Y, Z) is to clip the Z value within the range of X to Y. The Round is to round the value to an integer.
For example, the range section for rangeIdx=0 is 256 to 259, the MinRange is 256. The MinRange can be derived byMinRange=256+(rangeIdx<<2)  (18)
The M is the maximum value of (probIdx+1). For example, in JCTVC-F254 and VCEG-AZ07, the M is 512. Table 2 shows the lookup table disclosed in JCTVC-F254, which consists of 64 columns for the range values and 512 entries. For each entry, the range value is represented by 9 bits.
TABLE 2(Range >> 2)&63Sets01. . .63Range Min256260. . .508Range Max259263. . .511Pone >> 6POneRange One. . .. . .. . .. . .. . .. . .100.02 55. . .10110.02366. . .11120.02466. . .12130.02677. . .13140.02877. . .14150.03 88. . .15. . .. . .. . .. . .. . .. . .511 0.999255259. . .507
Two in-loop filters are included in H.265/HEVC video coding standard. They are deblocking filter and sample adaptive offset (SAO). The deblocking filter can reduce the blocky artifacts caused by quantization error. SAO can further improve the video quality by applying offset values to classified samples. Prior to HEVC Test Model 7 (HM-7), another in-loop filtering technique named adaptive loop filter (ALF) was also included. ALF uses Wiener filtering techniques to derive filter coefficients. Multiple filters are coded according to different picture regions. The filter coefficients are coded in adaptation parameter set (APS), and on/off control flags are coded using CTU-level (coding tree unit level) syntax elements.
It is obvious that filter coefficients are the major bitrate overhead when coding ALF syntax elements. Usually, the texture characteristics of neighbouring coding block are very similar to the current coding block. Therefore, the neighbouring coding block filter can be directly used for the current coding block to save bitrate overhead. Since two neighbouring blocks apply the same filter coefficients in this case, this coding method is also called filter merge. A priority-based block filter merge scheme has also been disclosed. The first step is to choose maximum N candidates from M pre-defined neighbouring blocks. The second step is to select one filter among N candidates and code its filter index to bitstream. In the following, a method to further improve the performance of the priority-based block filter merge scheme is disclosed.
When multiple filters are supported in ALF, besides dividing one picture into different regions, some pixel-based or block-based classification methods are also presented before HM-7. For example, an ALF technique to calculate the Sum-modified Laplacian Measure (SLM) of each pixel has been disclosed. Pixels with the same SLM value will be filtered by one filter. As shown in FIG. 3, each square denotes a pixel, and pixels of SLMn are filtered by one filter, where n can be 1, 2, or 3 in this example. Here, the SLM is treated as a kind of pixel classification rule (PCR). For block-based classification method, the first step is similar to the pixel-based classification to calculate the characteristic of each pixel in one block. The second step is to calculate the property of one block based on the characteristics of all pixels in one block.